cd  C:\Program Files\PostgreSQL\8.4\bin
set data=%DATE:~0,2%-%DATE:~3,2%-%DATE:~6,4%

mkdir C:\Sistema_recibo\backup\%data%

set dataAtual=%DATE:~0,2%-%DATE:~3,2%-%DATE:~6,4%.sql

SET PGPASSWORD=gmcsistemas
pg_dump -h  127.0.0.1  -U  postgres  -p 5432 -v -b -t clientes ProjetoRecibo > C:\Sistema_recibo\backup\%data%\bkpReciboClientes%dataAtual%
pg_dump -h  127.0.0.1  -U  postgres  -p 5432 -v -b -t funcionarios ProjetoRecibo > C:\Sistema_recibo\backup\%data%\bkpReciboFuncionarios%dataAtual%
pg_dump -h  127.0.0.1  -U  postgres  -p 5432 -v -b -t usuarios ProjetoRecibo > C:\Sistema_recibo\backup\%data%\bkpReciboUsuarios%dataAtual%
pg_dump -h  127.0.0.1  -U  postgres  -p 5432 -v -b -t ConfigSistema ProjetoRecibo > C:\Sistema_recibo\backup\%data%\bkpReciboConfig%dataAtual%
pg_dump -h  127.0.0.1  -U  postgres  -p 5432 -v -b -t Perfil ProjetoRecibo > C:\Sistema_recibo\backup\%data%\bkpReciboPerfil%dataAtual%
pg_dump -h  127.0.0.1  -U  postgres  -p 5432 -v -b -t Recibos ProjetoRecibo > C:\Sistema_recibo\backup\%data%\bkpReciboRecibos%dataAtual%
pg_dump -h  127.0.0.1  -U  postgres  -p 5432 -v -b -t cep ProjetoRecibo > C:\Sistema_recibo\backup\%data%\bkpReciboCep%dataAtual%

cd C:\Program Files\WinRAR
rar a c:\Sistema_recibo\backup\Backup_Sistema_recibo_%data%.rar C:\Sistema_recibo\backup\%data%
RD /S /Q C:\Sistema_recibo\backup\%data%\